<template>
 
    
  
    <div>
      <button @click="handleClick"> 退出 </button>
      <p>{{ $store.state.token }}</p>
      <p>{{ $store.state.userName }}</p>
        <!-- <div>
        <button v-on:click="initWebSocket()">Send</button>
    </div> -->
    </div>
</template>
<script>
// import axios from "axios"


export default {
   data() {
      return {
        tableData:[]
      }
   },

   
   methods: {
    handleClick() {
      // 处理点击事件的逻辑
      console.log('退出按钮被点击');
      this.$store.commit("delToken");
      this.$router.push({ path: "/dashboard" }).catch(()=>{});
      console.log(this.$store.state.token);

    }
  }
}
</script>
<style  scoped>

</style>
